<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="/WEB-INF/templates/templateFormulario.xhtml">
	
	<ui:define name="formContent">
		<f:loadBundle basename="props.lenguajes.messages" var="msg"></f:loadBundle>
			
		<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true"/>
		<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
	
		<p:dialog modal="true" widgetVar="statusDialog" header="Processing"   
		        draggable="false" closable="false">  
		    <p:graphicImage value="../../resources/img/ajaxloadingbar.gif" />
		</p:dialog>
		
		<p:dialog header="#{msg['message.devLlid.confirmationDialog']}" widgetVar="dlgConfirm" modal="true" height="100" closable="false" styleClass="centerContent" >  
		    <p:messages id="messages3" showDetail="true" autoUpdate="true" closable="true" />
		    <h:panelGrid columns="2" styleClass="centerContent">
		    	<p:commandButton id="cbNuevo" value="#{msg['message.devLlid.messageNewgGeneracion']}" style="font-size: 12px;"
					action="#{observadorAdminMB.reiniciar}"/>
				<p:commandButton id="btnSalir" value="#{msg['message.devLlid.messageSalir']}"  style="font-size: 12px;"
							action="#{observadorAdminMB.continuar}"/>
		    </h:panelGrid>
		</p:dialog>
			
			
		<p:watermark value="#{msg['message.devLlid.wmTitleNc']}" for="ncMask" style="font-size: 10px;"/>
		    
		<h:panelGrid columns="2">
			<p:autoComplete id="ncMask" value="#{observadorAdminMB.leerColaborador}"
			completeMethod="#{observadorAdminMB.complete}"
			style="font-size: 10px;" size = "30"/>
			<p:commandButton value="buscar" style="font-size: 12px;" action="#{observadorAdminMB.buscar}"/>
		</h:panelGrid>
		
		<p:separator/>
		
		<h:panelGrid columns="2">
			<h:panelGrid columns="2" style="font-size: 12px;">
				<h:panelGrid columns="2">
					<p:outputLabel value="#{msg['message.devLlid.titleNombre']}:" style="display: block; width:125px; font-weight:bold;"/>
					<p:inputText value="#{observadorAdminMB.vistaNombre}" id="nameInput" size="25" disabled="true" />
					
					
					<p:outputLabel value="#{msg['message.devLlid.titleCentroCosto']}:" style="display: block; width:125px; font-weight:bold;"/>
					<p:inputText value="#{observadorAdminMB.vistaCentroCostos}" id="ccInput" size="25" disabled="true" />
					
				</h:panelGrid>
				
				<h:panelGrid columns="2">
					<p:outputLabel value="#{msg['message.devLlid.titleNctrl']}:" style="display: block; width:125px; font-weight:bold;"/>
					<p:inputText value="#{observadorAdminMB.vistaNumeroControl}" id="ncInput" size="25" disabled="true" />
					
					<p:outputLabel value="#{msg['message.devLlid.titleArea']}:" style="display: block; width:125px; font-weight:bold;"/>
					<p:inputText value="#{observadorAdminMB.vistaArea}" id="areInput" size="25" disabled="true" />
					
				</h:panelGrid>
			</h:panelGrid>
			
		</h:panelGrid>
		
		<p:separator/>
		
		<h:panelGrid columns="1" style="font-size: 12px; font-weight:bold;">
			<h:panelGrid columns="1" style="font-size: 12px; font-weight:bold;">
				<p:outputLabel value="#{msg['message.devLlid.fsTitleonservadorPart']}:"/>
			</h:panelGrid>
			<h:panelGrid columns="1" style="font-size: 12px; font-weight:bold;">
				<p:selectOneRadio disabled="#{observadorAdminMB.buttonGroup}" id="options" 
				value="#{observadorAdminMB.radioOption}">
					<f:selectItem itemLabel="#{msg['message.devLlid.OrderYes']}" itemValue="1">
					</f:selectItem>  
	            	<f:selectItem itemLabel="#{msg['message.devLlid.OrderNo']}" itemValue="2"/>
	            	<p:ajax listener="#{observadorAdminMB.selectRadio}" event="change"/>
		        </p:selectOneRadio>
			</h:panelGrid>
		</h:panelGrid>
		
		<p:separator/>
		
		<div align="center">
			<p:commandButton
				id="cbr"
				value="#{msg['message.devLlid.actionTitleRegistraObservador']}" 
				disabled="#{observadorAdminMB.enableButton}"
				style="font-size: 12px;"
				action="#{observadorAdminMB.registrar}"/>
		</div>
			
	</ui:define>
</ui:composition>
